package almacenes.modelo.entidad;
// Generated 16/02/2012 04:45:02 PM by Hibernate Tools 3.4.0.CR1


import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * InspeccionDetalle generated by hbm2java
 */
@Entity
@Table(name="INSPECCION_DETALLE"
)
public class InspeccionDetalle  implements java.io.Serializable {

	 private static final long serialVersionUID = 1L;
	 private long idInspecDet;
     private Inspeccion inspeccion;
     private Stockprodagrup stockprodagrup;
     private int idEstadoProdInsp;
     private Boolean flagNoConfor;
     private String usuReg;
     private Date fecReg;
     private String usuAct;
     private Date fecAct;
     private List<NoConformes> noConformeses = new ArrayList<NoConformes>();

    public InspeccionDetalle() {
    }

	
    public InspeccionDetalle(long idInspecDet, Inspeccion inspeccion, Stockprodagrup stockprodagrup) {
        this.idInspecDet = idInspecDet;
        this.inspeccion = inspeccion;
        this.stockprodagrup = stockprodagrup;
    }
    public InspeccionDetalle(long idInspecDet, Inspeccion inspeccion, Stockprodagrup stockprodagrup, int idEstadoProdInsp, Boolean flagNoConfor, String usuReg, Date fecReg, String usuAct, Date fecAct, List<NoConformes> noConformeses) {
       this.idInspecDet = idInspecDet;
       this.inspeccion = inspeccion;
       this.stockprodagrup = stockprodagrup;
       this.idEstadoProdInsp = idEstadoProdInsp;
       this.flagNoConfor = flagNoConfor;
       this.usuReg = usuReg;
       this.fecReg = fecReg;
       this.usuAct = usuAct;
       this.fecAct = fecAct;
       this.noConformeses = noConformeses;
    }
   
    @Id 
    @Column(name="ID_INSPEC_DET", unique=true, nullable=false, precision=10, scale=0)
    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "SQ_INSPECCION_DETALLE")
    @SequenceGenerator(name = "SQ_INSPECCION_DETALLE", sequenceName = "SQ_INSPECCION_DETALLE",allocationSize=1)
    public long getIdInspecDet() {
        return this.idInspecDet;
    }
    
    public void setIdInspecDet(long idInspecDet) {
        this.idInspecDet = idInspecDet;
    }

@ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="ID_INSPECCION", nullable=false)
    public Inspeccion getInspeccion() {
        return this.inspeccion;
    }
    
    public void setInspeccion(Inspeccion inspeccion) {
        this.inspeccion = inspeccion;
    }

@ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="ID_STOCKPRODAGRUP", nullable=false)
    public Stockprodagrup getStockprodagrup() {
        return this.stockprodagrup;
    }
    
    public void setStockprodagrup(Stockprodagrup stockprodagrup) {
        this.stockprodagrup = stockprodagrup;
    }

    
    @Column(name="ID_ESTADO_PROD_INSP", precision=2, scale=0)
    public int getIdEstadoProdInsp() {
        return this.idEstadoProdInsp;
    }
    
    public void setIdEstadoProdInsp(int idEstadoProdInsp) {
        this.idEstadoProdInsp = idEstadoProdInsp;
    }

    
    @Column(name="FLAG_NO_CONFOR", precision=1, scale=0)
    public Boolean getFlagNoConfor() {
        return this.flagNoConfor;
    }
    
    public void setFlagNoConfor(Boolean flagNoConfor) {
        this.flagNoConfor = flagNoConfor;
    }

    
    @Column(name="USU_REG", length=10)
    public String getUsuReg() {
        return this.usuReg;
    }
    
    public void setUsuReg(String usuReg) {
        this.usuReg = usuReg;
    }

    @Temporal(TemporalType.DATE)
    @Column(name="FEC_REG", length=7)
    public Date getFecReg() {
        return this.fecReg;
    }
    
    public void setFecReg(Date fecReg) {
        this.fecReg = fecReg;
    }

    
    @Column(name="USU_ACT", length=10)
    public String getUsuAct() {
        return this.usuAct;
    }
    
    public void setUsuAct(String usuAct) {
        this.usuAct = usuAct;
    }

    @Temporal(TemporalType.DATE)
    @Column(name="FEC_ACT", length=7)
    public Date getFecAct() {
        return this.fecAct;
    }
    
    public void setFecAct(Date fecAct) {
        this.fecAct = fecAct;
    }

@OneToMany(fetch=FetchType.LAZY, mappedBy="inspeccionDetalle")
    public List<NoConformes> getNoConformeses() {
        return this.noConformeses;
    }
    
    public void setNoConformeses(List<NoConformes> noConformeses) {
        this.noConformeses = noConformeses;
    }




}


